package com.ruoyi.system.service;

import java.util.List;

import com.ruoyi.system.domain.Appointment;
import com.ruoyi.system.domain.Waybills;

/**
 * 运单Service接口
 * 
 * @author he
 * @date 2025-08-18
 */
public interface IWaybillsService 
{
    /**
     * 查询运单
     * 
     * @param id 运单主键
     * @return 运单
     */
    public Waybills selectWaybillsById(Long id);

    /**
     * 查询运单列表
     * 
     * @param waybills 运单
     * @return 运单集合
     */
    public List<Waybills> selectWaybillsList(Waybills waybills);

    /**
     * 新增运单
     * 
     * @param waybills 运单
     * @return 结果
     */
    public int insertWaybills(Waybills waybills);

    /**
     * 修改运单
     * 
     * @param waybills 运单
     * @return 结果
     */
    public int updateWaybills(Waybills waybills);

    /**
     * 批量删除运单
     * 
     * @param ids 需要删除的运单主键集合
     * @return 结果
     */
    public int deleteWaybillsByIds(Long[] ids);

    /**
     * 删除运单信息
     * 
     * @param id 运单主键
     * @return 结果
     */
    public int deleteWaybillsById(Long id);

    int signStateChange(List<Long> ids);

    Waybills book(Appointment appointment);

    Waybills selectWaybillsByCode(String code);

    void updateWaybillsToPlan();

    int rebackState(Waybills waybills);

    int bookConfirm(Waybills waybills);

    int register(Appointment appointment);

    Appointment getRegisterInfo(Appointment appointment);

    void updateWaybillsToInventory(List<Waybills> waybillsList);
    void updateWaybillsToFunds(List<Waybills> waybillsList);

    void updateWaybillsCheckUp(Waybills waybills);

    List<Waybills> selectWaybillsComplate(Waybills waybills);

    /**
     * 批量更新审批状态
     * 
     * @param ids 运单ID列表
     * @param approvalState 审批状态
     * @return 结果
     */
    int updateApprovalState(List<Long> ids, Integer approvalState);
}
